define(['ash'], function (Ash) {

	let TutorialConstants = {
		
		TUTORIAL_REPEATS_TYPE_NEVER: "NEVER",
		TUTORIAL_REPEATS_TYPE_ALWAYS: "ALWAYS",
		TUTORIAL_REPEATS_TYPE_COOLDOWN: "COOLDOWN",
		
		TUTORIAL_COOLDOWN_DURATION: 1000 * 60 * 10,
		
		tutorials: {
			TUTORIAL_BUILT_TRAP: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个陷阱，它将捕捉食物。",
				conditions: { improvements: { collector_food: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_BUCKET: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个水桶，它将收集水。",
				conditions: { improvements: { collector_water: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_HUT: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个棚屋，人们会在听说营地后过来。",
				conditions: { improvements: { house: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_BEACON: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "信标已经准备好，它的微光在周围投射出尖锐而固定的线条。",
				conditions: { improvements: { beacon: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_TOWER_BLOCK: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "修复了一个旧的塔楼，它可以容纳几个家庭。",
				conditions: { improvements: { house2: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_GENERATOR: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建立了一个发电机，它将使营地的生活更加舒适。",
				conditions: { improvements: { generator: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_STORAGE: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个仓库。",
				conditions: { improvements: { storage: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_AQUEDUCT: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个水道。",
				conditions: { improvements: { aqueduct: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_STABLE: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个马厩。现在我们可以派出自己的商人了。",
				conditions: { improvements: { stable: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_BARRACKS: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个兵营。我们现在可以招募士兵来保护营地。",
				conditions: { improvements: { barracks: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_SMITHY: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个铁匠铺。",
				conditions: { improvements: { smithy: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_APOTHECARY: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个药房。",
				conditions: { improvements: { apothecary: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_CEMENT_MILL: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个水泥厂来生产混凝土。",
				conditions: { improvements: { cementmill: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_ROBOT_FACTORY: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "机器人工厂已准备好工人。",
				conditions: { improvements: { robotFactory: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_ROBOT_RADIO: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个无线电塔。",
				conditions: { improvements: { radiotower: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_CAMPFIRE: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个营火。在这里，思想得以分享和讨论。",
				conditions: { improvements: { campfire: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_DARKFARM: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个蜗牛农场。它将生产食物。",
				conditions: { improvements: { darkfarm: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_HOSPITAL: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个诊所。",
				conditions: { improvements: { hospital: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_LIBRARY: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个图书馆。",
				conditions: { improvements: { library: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_MARKET: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个市场。",
				conditions: { improvements: { market: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_INN: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个旅馆。也许它会吸引游客。",
				conditions: { improvements: { inn: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_SQUARE: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个广场。营地现在感觉更像是城市中的一部分。",
				conditions: { improvements: { square: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_SHRINE: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个神龛，供奉地球的神秘力量。",
				conditions: { improvements: { shrine: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_GARDEN: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个苔藓花园。它是在城市的尖锐金属边缘中一个安抚的地方。",
				conditions: { improvements: { garden: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_TEMPLE: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个寺庙。在这里，人们可以一起探索这个新宗教。",
				conditions: { improvements: { temple: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_RESEARCH_CENTER: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个研究中心，媲美那些由地面人建造的旧中心。",
				conditions: { improvements: { researchcenter: [ 1, 2 ] } }
			},
			TUTORIAL_BUILT_TRADEPOST_1: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "贸易站已经准备好，但我们需要建造另一个来进行贸易。",
				conditions: { tribe: { improvements: { tradepost: [ 1, 2 ] } } }
			},
			TUTORIAL_BUILT_TRADEPOST_2: {
				triggers: [ "action_build" ],
				repeats: "NEVER",
				logMessage: "建造了一个贸易站，准备开始交易。",
				conditions: { tribe: { improvements: { tradepost: [ 2, 3 ] } } }
			},
			TUTORIAL_USED_HOSPITAL: {
				triggers: [ "action_any" ],
				repeats: "NEVER",
				delay: 1000,
				logMessage: "治疗了所有伤害。",
				conditions: { perkEffects: { "Injury": [ -1, 0 ] } }
			},
			TUTORIAL_PRODUCED_ROBOT: {
				triggers: [ "feature_unlocked", "action_any" ],
				repeats: "NEVER",
				delay: 1000,
				logMessage: "我们的第一个机器人已经准备就绪。它将帮助工人完成任务。",
				conditions: { featureUnlocked: { resource_robots: true }, inCamp: true, campInventory: { resource_robots: [ 1, -1 ] } }
			},
			TUTORIAL_CAN_MAKE_LIGHT: {
				triggers: [ "change_inventory" ],
				repeats: "COOLDOWN",
				delay: 1500,
				logMessage: "收集了足够的金属来制作灯笼。",
				conditions: { maxVision: [-1, 50], actionsAvailable: ["craft_light1"], featureUnlocked: { bag: true } }
			},
			TUTORIAL_CAN_BUILD_SHRINE: {
				triggers: [ "change_inventory", "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "我们现在可以为神灵建造神龛了。",
				conditions: { inCamp: true, deity: true }
			},
			
			TUTORIAL_CAN_BUILD_TEMPLE: {
				triggers: [ "change_inventory", "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "我们现在有足够的材料来建造一个寺庙",
				conditions: { inCamp: true, actionsAvailable: ["build_in_temple"] }
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_GAP_NO_TECH: {
				group: "TUTORIAL_ENCOUNTER_BLOCKER_TYPE_GAP",
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这里有一个巨大的缝隙。需要找出如何跨越它。",
				conditions: { sector: { blockers: { 1: true } }, upgrades: { "unlock_building_bridge": false } },
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_GAP_HAS_TECH: {
				group: "TUTORIAL_ENCOUNTER_BLOCKER_TYPE_GAP",
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这里有一个巨大的缝隙，但营地的工人可以架起桥梁。",
				conditions: { sector: { blockers: { 1: true } }, upgrades: { "unlock_building_bridge": true } },
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_GANG: {
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "有一些害虫阻碍了道路。",
				conditions: { sector: { blockers: { 3: true } } },
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_DEBRIS: {
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "有太多的碎片阻碍了道路。营地的工人可以清理它。",
				conditions: { sector: { blockers: { 4: true } } }
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_RADIOACTIVE_NO_TECH: {
				group: "TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_RADIOACTIVE",
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这里有太多的放射性废料无法继续前进。需要学习更多才能清理它。",
				conditions: { sector: { blockers: { 5: true } }, upgrades: { "unlock_action_clear_waste_r": false } },
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_RADIOACTIVE_HAS_TECH: {
				group: "TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_RADIOACTIVE",
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这里有太多的放射性废料无法继续前进，但可以清理。",
				conditions: { sector: { blockers: { 5: true } }, upgrades: { "unlock_action_clear_waste_r": true } },
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_TOXIC_NO_TECH: {
				group: "TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_TOXIC",
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这里有太多的有毒废料无法继续前进。需要找出如何清理它。",
				conditions: { sector: { blockers: { 6: true } }, upgrades: { "unlock_action_clear_waste_t": false } },
			},
			TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_TOXIC_HAS_TECH: {
				group: "TUTORIAL_ENCOUNTER_BLOCKER_TYPE_WASTE_TOXIC",
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这里有太多的有毒废料无法继续前进，必须先清理。",
				conditions: { sector: { blockers: { 6: true } }, upgrades: { "unlock_action_clear_waste_t": true } },
			},
			TUTORIAL_ENCOUNTER_LEVEL_14_RADIATION: {
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这个区域很危险。需要更好的设备才能探索。",
				conditions: { sector: { hazards: { radiation: [ 1, -1 ] } }, player: { affectedByHazard: true, position: { level: 14 } } },
			},
			TUTORIAL_ENCOUNTER_HAZARD_DEBRIS: {
				triggers: [ "change_position" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这些街道充满了碎片，使其难以穿越。",
				conditions: { sector: { hazards: { debris: [ 1, -1 ] } } },
			},
			TUTORIAL_ENCOUNTER_SPRING: {
				triggers: [ "action_scout" ],
				repeats: "NEVER",
				logMessage: "这里有一个可靠的水源。",
				conditions: { sector: { spring: true } },
			},
			TUTORIAL_ENCOUNTER_INGREDIENT_SECTOR: {
				triggers: [ "action_scout" ],
				repeats: "NEVER",
				delay: 500,
				logMessage: "看起来这是一个可能找到制作材料的地方。",
				conditions: { sector: { scavengeableItems: { count: [ 1, -1 ] } } },
			},
			TUTORIAL_ENCOUNTER_SECTOR_ENEMIES: {
				triggers: [ "action_scout" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "里有一些敌对生物。搜刮变得更加危险。",
				conditions: { sector: { enemies: true } },
			},
			TUTORIAL_ENCOUNTER_OUTPOST: {
				triggers: [ "action_enter_camp" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "这个层级上住的人很少。营地会增长得更慢。",
				conditions: { inCamp: true, "level": { "population": [ -1, 1 ] } }
			},
			TUTORIAL_FEATURE_UNLOCKED_MOVE: {
				triggers: [ "feature_unlocked", "change_inventory" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "可能值得探索周围的环境。",
				conditions: { featureUnlocked: { move: true }, playerInventory: { resource_food: [2, -1], resource_water: [2, -1 ], inCamp: false } }
			},
			TUTORIAL_FEATURE_UNLOCKED_UPGRADES: {
				triggers: [ "feature_unlocked", "action_enter_camp" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "线索和传闻可以在篝火旁转化为知识。",
				conditions: { featureUnlocked: { upgrades: true }, inCamp: true }
			},
			TUTORIAL_FEATURE_UNLOCKED_MILESTONES: {
				triggers: [ "feature_unlocked", "action_enter_camp" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "营地现在很小，但会增长。我们一起能做更多的事情。",
				conditions: { featureUnlocked: { milestones: true }, inCamp: true }
			},
			TUTORIAL_FEATURE_UNLOCKED_BAG: {
				triggers: [ "feature_unlocked" ],
				repeats: "NEVER",
				delay: 1500,
				logMessage: "找到一个可以携带更多物品的包。",
				conditions: { featureUnlocked: { bag: true } }
			},
			TUTORIAL_FOUND_METAL: {
				triggers: [ "action_collect_rewards" ],
				delay: 0,
				repeats: "NEVER",
				logMessage: "找到了一些罐头食品",
				conditions: { playerInventory: { resource_food: [1, -1] } }
			},
			TUTORIAL_FOUND_FOOD: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				delay: 0,
				logMessage: "找到了一些废金属。这可能对制作有用。",
				conditions: { playerInventory: { resource_metal: [1, -1] } }
			},
			TUTORIAL_FOUND_ROPE: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些绳索。可能对建筑和制作有用。",
				conditions: { playerInventory: { resource_rope: [1, -1] } }
			},
			TUTORIAL_FOUND_HERBS: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些干草药",
				conditions: { playerInventory: { resource_herbs: [1, -1] } }
			},
			TUTORIAL_FOUND_FUEL: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些燃料。",
				conditions: { playerInventory: { resource_fuel: [1, -1] } }
			},
			TUTORIAL_FOUND_RUBBER: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些橡胶。",
				conditions: { playerInventory: { resource_rubber: [1, -1] } }
			},
			TUTORIAL_FOUND_MEDICINE: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些药品。这些是更安全时代的珍稀遗物。",
				conditions: { playerInventory: { resource_medicine: [1, -1] } }
			},
			TUTORIAL_FOUND_TOOLS: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些有用的工具。",
				conditions: { playerInventory: { resource_tools: [1, -1] } }
			},
			TUTORIAL_FOUND_CONCRETE: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些混凝土。",
				conditions: { playerInventory: { resource_concrete: [1, -1] } }
			},
			TUTORIAL_FOUND_ROBOT: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一台工作中的机器人。这在营地中可能会很有用。",
				conditions: { playerInventory: { resource_robots: [1, -1] } }
			},
			TUTORIAL_FOUND_SILVER: {
				triggers: [ "action_collect_rewards" ],
				repeats: "NEVER",
				logMessage: "找到了一些银币。一些商人接受这些。",
				conditions: { playerInventory: { silver: [1, -1] } }
			},
			TUTORIAL_WARNING_STORAGE_FULL: {
				triggers: [ "update" ],
				repeats: "COOLDOWN",
				logMessage: "储存空间已满。",
				conditions: { inCamp: true, campInventoryFull: true } 
			},
		},

	};
	
	return TutorialConstants;
});
